package com.logos.mybatis.mapper;

import com.logos.mybatis.entity.User;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;
import java.util.Objects;

public interface ParameterMapper {

    /**
     * 查询所有员工
     */
    List<User> selectAllUser();

    /**
     * 根据id查询用户
     */
    User selectById(Integer id);

    /**
     * 根据用户名和邮箱查询用户
     */
    User selectByUserNameAndEmail(@Param(value = "username") String username,
                                  @Param(value = "email") String email);

    /**
     * 根据用户名和邮箱查询用户
     */
    User selectByMap(Map<String, Object> map);

    /**
     * 新增用户
     */
    int insertUser(User user);

    /**
     * 根据用户名和邮箱查询用户
     */
    User selectByParam(@Param(value = "username") String username,
                       @Param(value = "email") String email);
}
